package com.test.fundible.fundible_00_analytics.fundiblehttp

import java.sql.DriverManager.println
import java.util.concurrent.BlockingQueue
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit


class FundibleHttpPoolExecutor(
    corePoolSize_fundible: Int,
    maximumPoolSize_fundible: Int,
    keepAliveTime_fundible: Long,
    unit_fundible: TimeUnit?,
    workQueue_fundible: BlockingQueue<Runnable>?
) : ThreadPoolExecutor(corePoolSize_fundible, maximumPoolSize_fundible, keepAliveTime_fundible, unit_fundible, workQueue_fundible) {

    override fun beforeExecute(t: Thread?, r: Runnable?) {
        super.beforeExecute(t, r)
        println("线程：${t?.name} 准备执行")
    }

    override fun afterExecute(r: Runnable?, t: Throwable?) {
        super.afterExecute(r, t)
        println("线程：${Thread.currentThread().name} 执行结束")
    }

    override fun terminated() {
        super.terminated()
        println("线程：结束")
    }
}